import http from './http'

//获取当前登录人信息
export let userInfo = ()=>{
    return http.get('/user/user-info');
}
//获取当前登陆人的菜单
export let getMenus=()=>{
    return http.get('/menu/current');
}

//获取所有的用户
export let pageN = (params)=>{
    return http.get('/user/page',params);
}
//获取所有的用户
export let addUser = (data)=>{
    return http.post('/user',data);
}

//删除用户
export let deleteUser = (id)=>{
    return http.del(`/user/${id}`);
}
//更新用户
export let updateUser = (data)=>{
    return http.put('/user',data);
}

//根据id获取用户详细信息
export let userDetail = (id)=>{
    return http.get(`/user/${id}`);
}